const im = {
  state: {
	 imClient: null,
	 imAvatarUrl:'',
	 imGroupId:'',
	 groupUnreadMessages:[],
	 hisMessages:[]
  },
  mutations: {
	  'SET_IM_AVATAR_URL': (state, data) => {
	    state.imAvatarUrl = data
	  },  
	  'SET_IM_CLIENT': (state, data) => {
	    state.imClient = data
	  },
	  'SET_IM_GROUP_ID': (state, data) => {
	    state.imGroupId = data
	  }
  },
  actions: {
	  setImAvatarUrl({ commit }, data) {
	    commit('SET_IM_AVATAR_URL', data)
	  },  
	  setImClient({ commit }, data) {
	    commit('SET_IM_CLIENT', data)
	  },
	  setImGroupId({ commit }, data) {
	    commit('SET_IM_GROUP_ID', data)
	  }
  }
}

export default im